Skip to content

feat(ControlPanel): improved store order retrieval and search index - #906

Merged
jakeaturner merged 1 commit into
stagingfrom
feat/store-order-index
Aug 13, 2026
Merged

feat(ControlPanel): improved store order retrieval and search index#906
jakeaturner merged 1 commit into
stagingfrom
feat/store-order-index

Conversation

@jakeaturner

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the ControlPanel Store Management experience by moving the admin order list to a dedicated storeOrders Meilisearch index, eliminating per-row live Stripe calls and adding basic search/filtering support.

Changes:

  • Persist amountTotal and currency on StoreOrder and add a one-time migration to backfill historical orders from Stripe.
  • Introduce a storeOrders Meilisearch index with server-side sync/upsert helpers and SearchService configuration.
  • Update the admin orders endpoint and ControlPanel UI to page/search via Meilisearch and render a Stripe-free list item shape.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/types/Store.ts Adds StoreOrderListItem type for the new admin list response shape.
server/models/storeorder.ts Persists amountTotal/currency fields on StoreOrder.
server/migrations/BackfillStoreOrderAmounts.ts New migration to backfill totals/currency (and missing emails) from Stripe sessions.
server/api/services/store-service.ts Mirrors totals into Mongo on processing and switches admin list retrieval to Meilisearch; upserts index on key state changes.
server/api/services/store-order-search-service.ts New index sync/upsert/remove helpers and aggregation shaping for storeOrders.
server/api/services/search-service.ts Registers storeOrders index and its primary key/searchable/filterable/sortable attributes.
server/api/search-index-management.ts Adds storeOrders support to the admin “Re-sync” workflow.
client/src/types/Store.ts Adds client-side StoreOrderListItem type.
client/src/screens/conductor/controlpanel/StoreManager/index.tsx Updates Store Manager to use Meilisearch-backed pagination and adds debounced search UI.
client/src/api.ts Updates adminGetStoreOrders typing to return StoreOrderListItem items.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +48 to +51
const debouncedSetQuery = useMemo(
() => debounce((value: string) => setSearchQuery(value.trim()), 400),
[]
);
@jakeaturner
jakeaturner merged commit 4cfa279 into staging Aug 13, 2026
6 checks passed
@jakeaturner
jakeaturner deleted the feat/store-order-index branch August 13, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants